/*
 *  SPAGL Copyright (C) 2008 Sam Pottinger
 *  This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 
 *  General Public License as published by the Free Software Foundation; either version 2.1 of the License, or 
 *  (at your option) any later version. This library is distributed in the hope that it will be useful, but 
 *  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
 *  See the GNU Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public License along with this library; if not, 
 *  write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
 */

package spagcore;

/**
 * The interface to standardize the use of "windows"
 * @author Sam Pottinger
 */
public interface SpaglCoreWindow extends SpaglCoreContainer, SpaglCoreEventGenerator {
	
	// Varibles for close event operation
	public final static String HIDE = "Hide";
	public final static String DISPOSE = "Dispose";
	public final static String EXIT = "Exit";
	public final static String NOTHING = "Nothing";
	
	/**
	 * Preform the close event/code
	 */
	public void close();
	
	/**
	 * Preform or simulate the disposal code for this object. Please note that the implementation is library-specific.
	 */
	public void dispose();
	
	/**
	 * Sets the title bar text
	 * @param t The new title to be used for this widow
	 */
	public void setTitle(String t);
	
	/**
	 * Gets the title bar text currenly being displayed on this widow
	 * @return The string currently being displayed at the top of this window
	 */
	public String getTitle();
	
	/**
	 * Determines how the window will close
	 * @param e The string representation of the desired close operation. Note: make sure to use the library specific SpaglWindow values
	 */
	public void setCloseOperation(String e); 
	
	/**
	 * Determines how the window will close
	 * @param i The integer representation of the desired close operation. Note: make sure to use the library specific SpaglWindow values
	 */
	public void setCloseOperation(int i);
	
	/**
	 * Gets the actions that will be taken when this window is closed
	 * @return The integer representation of the close operation
	 */
	public int getCloseOperation();
	
	/**
	 * Prepares the window and shows it to the user
	 */
	public void display();
	
	/**
	 * Sets the absolute size of this widow
	 * @param xSize The new horizontal size of this window
	 * @param ySize The new vertical size of this window
	 */
	public void setSize(int xSize, int ySize);
	
	/**
	 * Determines if this window is shown
	 * @param v True to show this window or false to hide it
	 */
	public void setVisible(boolean v);
	
	/**
	 * Resize the window and arrange the widgets in an ideal way as determined by the specific library
	 */
	public void pack();
	
	/**
	 * Determines the absolute horizontal size of this window
	 * @return An integer representation of the absolute width of this widget
	 */
	public int getWidth();
	
	/**
	 * Determines the absolute vertical size of this window
	 * @return An integer representation of the absolute height of this widget
	 */
	public int getHeight();
	
	/**
	 * Gets the parent SpaglApp that this window belongs to
	 * @return The SpaglApp that this window belongs to as a SpaglCoreApp
	 */
	public SpaglCoreApp getApp();
	// Should also include setLayoutManager to take in plat. specific MigLayout
	// Should also include getLayoutManager to return plat. specific MigLayout

}
